package com.oocl.o2o.merchant.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
/**
 * 收货地址
 * @author XIEMI2
 *
 */
@Entity
@Table(name = "receiver_info")
@GenericGenerator(name = "receiver_info_id_generator", strategy = "uuid")
public class ReceiverInfo {
	@Id
	@GeneratedValue(generator = "receiver_info_id_generator")
	@Column(columnDefinition = "char(32)")
	private String id;
	private String name; // may be no use
	private String phone;
	private String address;
	@ManyToOne
	@JoinColumn(name = "customer_id", columnDefinition = "char(32)")
	private Customer customer;
	public ReceiverInfo() {
	}
	
	public ReceiverInfo(String name, String phone, String address, Customer customer) {
		this.name = name;
		this.phone = phone;
		this.address = address;
		this.customer = customer;
	}

	public String getId() {
		return id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	
	public Customer getCustomer() {
		return customer;
	}
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

}
